package imnu.work.work_3;

/**
 * @author: lys
 * @类名: Point
 * @Title:
 * @date: 2020/7/14
 **/
public class Point {
    private int x;
    private  int y;

    public Point(){}
    public Point(int x0,int y0){
        this.x = x0;
        this.y = y0;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public void movePoint(int dx, int dy){
        int dx1 = this.x+dx;
        int dy1 = this.y+dy;
        System.out.println("右移：");
        System.out.println("x:"+dx1+"\ty:"+dy1);
        int dx2 = this.x-dx;
        int dy2 = this.y-dy;
        System.out.println("左移：");
        System.out.println("x:"+dx2+"\ty:"+dy2);

    }

}
